<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function Cat(name, color) {
            this.name = name;
            this.color = color;
        }
        Cat.hello = '你好';
        Cat.isCat = function (arg) {
            if (arg.constructor == Cat) {
                return true;
            }
            return false
        }
        // Cat.prototype.species = "锚";
        Cat.prototype.say = function () {
            console.log(this.name, this.color);
        }
        Cat.prototype.sayHello = function () {
            console.log("hello");
        }

        function OrangeCat(name, color, body) {
            Cat.call(this, name, color)
            this.body = body
        }

        OrangeCat.prototype = new Cat("张三", "black")
        OrangeCat.prototype.constructor = OrangeCat;
        OrangeCat.prototype.sayname = function () {
            console.log(this.name + "大傻逼");
        }
        var x = new OrangeCat("李四", "orange", "100")
        console.log(x);
        // console.log(x.constructor);
    </script>
</body>

</html>